from django.urls import path
from .views import UserView,UserDetailView,StudentView,StudentDetailView,CourseView,CourseDetailView,GradeView,GradeDetailView,LoginView,UserImageView

urlpatterns = [
    path('user/',UserView.as_view()),
    path('user/<int:pk>',UserDetailView.as_view()),
    path('user/<int:pk>/image/',UserImageView.as_view()),
    path('student/',StudentView.as_view()),
    path('student/<int:pk>',StudentDetailView.as_view()),
    path('course/',CourseView.as_view()),
    path('course/<int:pk>',CourseDetailView.as_view()),
    path('grade/',GradeView.as_view()),
    path('grade/<int:pk>',GradeDetailView.as_view()),
    path('login/',LoginView.as_view()),
]



"""ViewSet视图的url"""
"""
# app/urls.py
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import UserViewSet

router = DefaultRouter()
router.register(r'users', UserViewSet)

urlpatterns = [
    path('', include(router.urls)),
]

"""